#include <funcs.h>
#include <x86.h> /* outportb(), inportb() */
extern int bsecond;
extern int bminute;
extern int bhour;
int year,month, day, hour, min, sec;
void txt_gui()
{
outportb(0x70, 0x09); // get the current second
year = bcd2dec(inportb(0x71)); 
	
outportb(0x70, 0x08); // get the current second
month = bcd2dec(inportb(0x71)); 	
	
outportb(0x70, 0x07); // get the current second
day = bcd2dec(inportb(0x71)); 
	
outportb(0x70, 0x04); // get the current hour
hour = bcd2dec(inportb(0x71));

outportb(0x70, 0x02); // get the current minute
min = bcd2dec(inportb(0x71));

outportb(0x70, 0x00); // get the current second
sec = bcd2dec(inportb(0x71)); 
	

		change_color(2);
		move_csrf_r(71,0); 
		kprintf("%d:%d:%d",hour,min,sec);
		move_csrf_rd();
		move_csrf_r(71,1); 
		kprintf("%d-%d-%d",day,month,year);
		move_csrf_rd();		
		move_csrf_r(71,2); 
		kprintf("%d-%d",get_x(),get_y());
		move_csrf_rd();		

		change_color(7);
		
}
